package com.csinc.generate.core.make;

/**
 * Create By 郭金宝 on 2018/7/25.<br>
 */
public abstract class MakeProject<T> {

    protected String outPath;
    protected String fileName;

    @SuppressWarnings("unchecked")
    public T outPath(String outPath) {
        this.outPath = outPath;
        return ((T) this);
    }

    @SuppressWarnings("unchecked")
    public T fileName(String fileName) {
        this.fileName = fileName;
        return ((T) this);
    }

    public abstract T make();

    protected void check() {
        if (fileName == null || fileName.trim().equals("")) {
            throw new RuntimeException("fileName must not be null!!!!!!111");
        }
    }
}
